//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<IScreen.h>
///	@path	~/src/graphics/
///	@date	2007/10/19
///	@desc	Screen interface.

#pragma once

#include "xeres.h"

#include "object/IObject.h"

#include "graphics/IDevice.h"

namespace xeres {

	/*!
		\class	IScreen
		\brief	Presents a screen interface.

		\sa IDevice
	*/
	class IScreen : public IObject
	{
	public:

		/// \name Constructor & Destructor
		//@{

		/// \ctor
		IScreen( void );

		/// \dtor
		virtual ~IScreen( void );

		//@}

		DECL_IOBJECT_INTERFACE( IScreen , IObject );

	public:

		/// \name IScreen Interface
		//@{

		/*!
			\brief		Initialize screen for window.
		*/
		virtual bool Initialize( void * window , RefWeak<IDevice> device ) = 0;

		/*!
			\brief		Finalize screen.
		*/
		virtual void Finalize( void ) = 0;

		/*!
			\brief		Get associated window handle.
		*/
		virtual void * GetWindow( void ) = 0;

		/*!
			\brief		Get screen size.
		*/
		virtual void GetSize( int& width , int& height ) = 0;

		/*!
			\brief		Call when window size maybe changed.
		*/
		virtual void OnSize( bool minimized ) = 0;

		/*!
			\brief		Call when window moved, may change monitor.
		*/
		virtual void OnMoved( void ) = 0;

		/*!
			\brief		Call before render this screen.
		*/
		virtual bool BeginRender( void ) = 0;

		/*!
			\brief		Call after render and ready to present the screen.
		*/
		virtual void EndRender( void ) = 0;

		//@}
	};

} // namespace xeres
